package org.mymail.mail;

import static org.junit.Assert.*;
import org.mymail.mail.SubscriberDetails;
import java.util.ArrayList;

import junit.framework.TestCase;

import org.mymail.mail.UpdateSubscribers;

public class TestUpdateSubscribers extends TestCase {

	public void testProcessSubscribers() {

		String from = "test@test.com";
		ArrayList<SubscriberDetails> a = new ArrayList<SubscriberDetails>();
		String str = "Calvin - calvin@hobbes.com";
		
		a = UpdateSubscribers.processSubscribers(from, a, str);

		assertEquals(a.get(0).getSubscribedBy(), "test@test.com");
		assertEquals(a.get(0).getName(), "Calvin");
		assertEquals(a.get(0).getMailID(), "calvin@hobbes.com");

	}

}
